import request from '@/config/axios'

// 企业职位信息 VO
export interface JobInfoVO {
  jobId: number;
  jobName: string;
  jobType:number;
  salaryRangeFrom:number;
  salaryRangeTo:number;
  jobCity:string;
  jobDuty:string;
  jobAsk:string;
  salaryMonth:number;
  salaryMeet:number
  jobRequireEdu:number;
  jobEndDay:string;
  avatarPath:string;
  enterpriseName:string;
  collectionStatus:boolean;
}

// 企业职位信息 API
export const JobInfoApi = {
  // 查询企业职位信息分页
  getJobInfoPage: async (params: any) => {
    return await request.get({ url: `/dbit/student-job-info/page`, params })
  },
    // 获取推荐职位信息
    recommendJobInfo: async (id: number) => {
     return await request.get({ url: `/dbit/student-job-info/recommend?userId=${id}`})
  },
  // 获取最新职位信息
  latestJobInfo: async () => {
    return await request.get({ url: `/dbit/student-job-info/latest`})
 },

  // 查询企业职位信息详情
  getJobInfo: async (id: number) => {
    return await request.get({ url: `/dbit/student-job-info/get?id=` + id })
  },

// 获取地区树
getCityTree: async () => {
  return await request.get({ url: `/system/area/tree` })
},

// 收藏职位
createJobCollectionInfo: async (jId: number) => {
  return await request.get({ url: `/dbit/student-job-info/collection?jobId=` + jId })
},


  // 导出企业职位信息 Excel
  exportJobInfo: async (params) => {
    return await request.download({ url: `/dbit/student-job-info/export-excel`, params })
  }
}